/* -----------------------------------------------------------------------
 * Include the following lines in your makefile:
 *
 * unittest1: cardtest1.c dominion.o rngs.o
 *      gcc -o cardtest1 -g  cardtest1.c dominion.o rngs.o $(CFLAGS)
 * -----------------------------------------------------------------------
 */

#include "dominion.h"
#include "dominion_helpers.h"
#include <string.h>
#include <stdio.h>
#include <assert.h>
#include "rngs.h"

// set NOISY_TEST to 0 to remove printfs from output
#define NOISY_TEST 1

int main () {

  int r;
 
  int pos = 1;
  int k[10] = {adventurer, council_room, feast, gardens, mine,
               remodel, smithy, village, baron, great_hall};
  int bonus = 0;
       
  struct gameState G;
 
  r = initializeGame(2, k, 1, &G);

#if (NOISY_TEST == 1) 
  printf("TESTING Council Room\n");
  printf ("initializeGame(2, k, 1, &G) = %d\n", r);
#endif  
assert(r == 0);
 
  int count = numHandCards(&G);
  int buys = G.numBuys;
  printf("Player %d\n", whoseTurn(&G) );
  printf("Count before: %d\n", count );
  cardEffect(council_room,0,0,0,&G,pos,&bonus);
 printf("count after: %d\n", numHandCards(&G) );
 
#if (NOISY_TEST == 1) 
  if (numHandCards(&G) == count + 3){
    printf("council_room card count: PASS\n");
  }else {
    printf("council_room card count: FAIL\n");
  }

  if (G.numBuys == buys + 1){
    printf("council_room buy count: PASS\n");
  }else {
    printf("council_room buy count: FAIL\n");
  }
#endif
 
  return 0;
}

